function [DevSettings,LogID] = SetBladeRF()
    %% set bladerf
    rootpath = cd;
    DevSettings.sampletime       = 70;                                     % Data receiving time      [s]
    DevSettings.num_rxs          = 60;                                      % Number of batches stored [times]
    DevSettings.Fs               = 4.5e6;                                   % Sampling Frequency       [Hz]
    DevSettings.Fc               = 1575.42e6;                              % Center Frequency         [Hz]
    DevSettings.Bw_rx            = 10e6;                                   % Bandwidth                [Hz]
    DevSettings.num_buf          = 512;                                   % buffer size of BladeRF
    DevSettings.channel          = 'RX1';                                  % Choose Channel 'RX1'/'RX2'
    DevSettings.biastee          = 1;                                      % Biastee (1/0 = open or close)
%     DevSettings.agc              = 'FAST';
    DevSettings.dataType         = 'double';                               % Data type (BladeRF & GPS Receiver)
    DevSettings.SavePath         = [rootpath,'\',...
                                    datestr(now,'mmmm-dd-yyyy__HH-MM-SS')];% Save file path named as now time
    DevSettings.FileName         = datestr(now,'mmmm-dd-yyyy__HH-MM-SS');  % Stored file named as now time
    DevSettings.LibPath          = 'C:\Program Files\bladeRF\matlab';      % BladeRF matlab lib
    DevSettings.RealTimeProcess  = true;                                   % if RealTimeProcess = false,use history data
    DevSettings.HistoryDataPath  = ['E:\数据\GPS_L1BladeRfData',...
                                    '\GPS_L1_BladeRF数据\静态楼下多径',...
                                    'September-03-2022__20-04-18']; % It only works when RealTimeProcess = false
    DevSettings.HistoryDataName  = 'September-03-2022__20-04-18_';   % It only works when RealTimeProcess = false
    DevSettings.FileType         = 'dat';                                  % File type (BladeRF & GPS Receiver)
% Real-time sampling Create a folder that contains two data files 
% (one each for branches I and Q) and a log file
    if DevSettings.RealTimeProcess
        mkdir(DevSettings.SavePath)
        LogID = fopen([DevSettings.SavePath,'\',...
                       DevSettings.FileName,'_Log.txt'],'w+');             % Create a new log file 
       fprintf(LogID,['DevSettings.sampletime       = %8.3f [s]\r\n',...
                      'DevSettings.num_rxs          = %8.3f times\r\n',...
                      'DevSettings.Fs               = %8.3f [MHz]\r\n',...
                      'DevSettings.Fc               = %8.3f [MHz]\r\n',...
                      'DevSettings.Bw_rx            = %8.3f [MHz]\r\n',...
                      'DevSettings.num_buf          = %8.3f.\r\n'],...
                      DevSettings.sampletime,...
                      DevSettings.num_rxs,...
                      DevSettings.Fs/1e6,...
                      DevSettings.Fc/1e6,...
                      DevSettings.Bw_rx/1e6,...
                      DevSettings.num_buf);
       fprintf(LogID,['DevSettings.DataType         = %s\r\n',...
                      'DevSettings.FileType         = %s\r\n'],...
                       DevSettings.dataType,...
                       DevSettings.FileType);
    else
        LogID = [];
    end
end

